package com.hx.vending.service;

import com.hx.vending.bean.Trails;
import com.hx.vending.util.Msg;

import java.util.List;

/**
 * Created by Administrator on 2018/11/26.
 * 货道
 */
public interface ITrailsService {

    /**
     * 添加货道信息
     * @param trails
     * @return
     */
    Msg insertTrails(Trails trails, Integer modelId);


    /**
     * 修改货道信息
     * @param trails
     * @return
     */
    Msg updateTrails(Trails trails, Integer modelId);


    /**
     * 删除货道信息
     * @param trailsId
     * @return
     */
    Msg deleteTrails(Integer trailsId);


    /**
     * 根据货道id查询补货时所需信息
     * @param trailsId
     * @return
     */
    Msg selectReplenishmentMessage(Integer trailsId);

    /**
     * 货道补货（单个）
     * @param goodsId
     * @param trailsId
     * @param goodsNumber
     * @return
     */
    Msg updateReplenishmentMessage(String goodsId, Integer trailsId, Integer goodsNumber);

    List<Trails> selectByExample(Trails trails);

    /**
     * 根据设备id删除货道信息
     * @param equipmentId
     * @return
     */
    int deleteByEquipmentId(String equipmentId);

    Trails selectByPrimaryKeySelective(Trails trails);

    int updateByPrimaryKey(Trails trails);

    int updateByTrails(Trails trails);

    /**
     * 设备一键补货
     * @param equipmentId
     * @return
     */
    Msg updateupdateAllReplenishmentMessage(String equipmentId);

    /**
     * 货道故障解决
     * @param trailsId
     * @return
     */
    Msg updateTrailsFaultResolution(Integer trailsId);

    /**
     * 货道故障列表
     * @param equipmentId
     * @return
     */
    Msg selectTrailsAlarm(String equipmentId);

}
